3.20 \(\int \sec ^2(c+d x) (a+a \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=38 \[ \frac {2 a^4 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}-a^2 x \]

[Out]

-a^2*x+2*a^4*cos(d*x+c)/d/(a^2-a^2*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2670, 2680, 8} \[ \frac {2 a^4 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}-a^2 x \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^2*(a + a*Sin[c + d*x])^2,x]

[Out]

-(a^2*x) + (2*a^4*Cos[c + d*x])/(d*(a^2 - a^2*Sin[c + d*x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2670

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[(a/g)^
(2*m), Int[(g*Cos[e + f*x])^(2*m + p)/(a - b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 -
 b^2, 0] && IntegerQ[m] && LtQ[p, -1] && GeQ[2*m + p, 0]

Rule 2680

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(2*g*(
g*Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(2*m + p + 1)), x] + Dist[(g^2*(p - 1))/(b^2*(2*m +
 p + 1)), Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && Eq
Q[a^2 - b^2, 0] && LeQ[m, -2] && GtQ[p, 1] && NeQ[2*m + p + 1, 0] &&  !ILtQ[m + p + 1, 0] && IntegersQ[2*m, 2*
p]

Rubi steps

\begin {align*} \int \sec ^2(c+d x) (a+a \sin (c+d x))^2 \, dx &=a^4 \int \frac {\cos ^2(c+d x)}{(a-a \sin (c+d x))^2} \, dx\\ &=\frac {2 a^4 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}-a^2 \int 1 \, dx\\ &=-a^2 x+\frac {2 a^4 \cos (c+d x)}{d \left (a^2-a^2 \sin (c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 75, normalized size = 1.97 \[ \frac {2 a^2 \sqrt {\sin (c+d x)+1} \left (\sqrt {1-\sin (c+d x)} \sin ^{-1}\left (\frac {\sqrt {1-\sin (c+d x)}}{\sqrt {2}}\right )+\sqrt {\sin (c+d x)+1}\right ) \sec (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^2*(a + a*Sin[c + d*x])^2,x]

[Out]

(2*a^2*Sec[c + d*x]*Sqrt[1 + Sin[c + d*x]]*(ArcSin[Sqrt[1 - Sin[c + d*x]]/Sqrt[2]]*Sqrt[1 - Sin[c + d*x]] + Sq
rt[1 + Sin[c + d*x]]))/d

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 74, normalized size = 1.95 \[ -\frac {a^{2} d x - 2 \, a^{2} + {\left (a^{2} d x - 2 \, a^{2}\right )} \cos \left (d x + c\right ) - {\left (a^{2} d x + 2 \, a^{2}\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right ) - d \sin \left (d x + c\right ) + d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-(a^2*d*x - 2*a^2 + (a^2*d*x - 2*a^2)*cos(d*x + c) - (a^2*d*x + 2*a^2)*sin(d*x + c))/(d*cos(d*x + c) - d*sin(d
*x + c) + d)

________________________________________________________________________________________

giac [A]  time = 0.55, size = 33, normalized size = 0.87 \[ -\frac {{\left (d x + c\right )} a^{2} + \frac {4 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-((d*x + c)*a^2 + 4*a^2/(tan(1/2*d*x + 1/2*c) - 1))/d

________________________________________________________________________________________

maple [A]  time = 0.18, size = 47, normalized size = 1.24 \[ \frac {a^{2} \left (\tan \left (d x +c \right )-d x -c \right )+\frac {2 a^{2}}{\cos \left (d x +c \right )}+a^{2} \tan \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^2*(a+a*sin(d*x+c))^2,x)

[Out]

1/d*(a^2*(tan(d*x+c)-d*x-c)+2*a^2/cos(d*x+c)+a^2*tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.67, size = 47, normalized size = 1.24 \[ -\frac {{\left (d x + c - \tan \left (d x + c\right )\right )} a^{2} - a^{2} \tan \left (d x + c\right ) - \frac {2 \, a^{2}}{\cos \left (d x + c\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-((d*x + c - tan(d*x + c))*a^2 - a^2*tan(d*x + c) - 2*a^2/cos(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 4.56, size = 28, normalized size = 0.74 \[ -a^2\,x-\frac {4\,a^2}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(c + d*x))^2/cos(c + d*x)^2,x)

[Out]

- a^2*x - (4*a^2)/(d*(tan(c/2 + (d*x)/2) - 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int 2 \sin {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sec ^{2}{\left (c + d x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**2*(a+a*sin(d*x+c))**2,x)

[Out]

a**2*(Integral(2*sin(c + d*x)*sec(c + d*x)**2, x) + Integral(sin(c + d*x)**2*sec(c + d*x)**2, x) + Integral(se
c(c + d*x)**2, x))

________________________________________________________________________________________